package pkmn.move;

import pkmn.battle.BattlePokemon;
import pkmn.util.Util;

public class RestoreLife extends IndirectAction{

    @Override
    public void execute(BattlePokemon battlePokemon){
        int maxLife = battlePokemon.getPokemon().getMaxLife();
        int life = battlePokemon.getPokemon().getLife();
        if (maxLife > life){
            battlePokemon.getPokemon().addLife(maxLife / 4);
            Util.printAndWait(battlePokemon + " restored!");
        }else{
            Util.printAndWait("No effect!");
        }
    }
}
